home *** CD-ROM | disk | FTP | other *** search
- /* writetsipp.c - dump the internal database to a TSIPP input file
- * - written by Glenn M. Lewis - 10/11/91
- */
-
- static char rcs_id[] = "$Id: writetsipp.c,v 1.1 1994/01/20 22:14:52 glewis Exp $";
-
- #include <stdio.h>
- #include <ctype.h>
- #include "t3dlib.h"
- #ifdef __STDC__
- #include <stdlib.h>
- #include <strings.h>
- #include "writetsipp_protos.h"
- #endif
-
- static void process_DESC();
- static void process_EXTR();
- static void process_INFO();
- static void process_OBJ();
-
- /* Two-space tabs */
- #define TABSTOP " "
-
- static FILE *out;
- static char tab[133];
- static int num_OBJ, num_DESC, num_TOBJ;
- static int cur_level, cur_objnum;
- static int prntline;
-
- static struct save_hier {
- int objnum;
- struct save_hier *next;
- } *root = 0;
- typedef struct save_hier HIER;
-
- /* Here are a few necessary utilities */
-
- static void indent()
- {
- strcat(tab, TABSTOP);
- }
-
- static void outdent()
- {
- register int i = strlen(tab) - strlen(TABSTOP);
- if (i<0) {
- fprintf(stderr, "Whoa, Glenn! You blew it!\n");
- tab[0] = '\0';
- return;
- }
- tab[i] = '\0';
- }
-
- #define ROUNDIT(x) ((double)((long)((x)*1000.0+0.5-((x)<0.0)))/1000.0)
-
- static void send_XYZ(f) /* Print a common string */
- XYZ_st *f;
- {
- fprintf(out, "{%.12g %.12g %.12g} ",
- ROUNDIT(f->x), ROUNDIT(f->y), ROUNDIT(f->z));
- }
-
- static void send_RGB(rgb) /* Print a common string */
- RGB_st *rgb;
- {
- fprintf(out, "{%.12g %.12g %.12g} ",
- ROUNDIT(((double)rgb->r)/255.0),
- ROUNDIT(((double)rgb->g)/255.0),
- ROUNDIT(((double)rgb->b)/255.0));
- }
-
- /********************/
- /* The MAIN section */
- /********************/
-
- int write_TSIPP(world, file)
- WORLD *world;
- FILE *file;
- {
- register OBJECT *o;
-
- if (!(out=file) || !world) return(0); /* File not open */
-
- tab[0] = '\0';
- num_OBJ = num_DESC = num_TOBJ = 0;
-
- fprintf(out, "## T3DLIB %s - Written by Glenn M. Lewis - %s\n\n",
- REV, __DATE__);
-
- if (world->info) process_INFO(world->info);
- for (o=world->object; o; o=o->next)
- process_OBJ(o);
- return(1);
- }
-
- static void process_INFO(info)
- INFO *info;
- {
- fprintf(out, "#%s INFO Begin\n", tab);
- indent();
- /*
- for (i=0; i<8; i++)
- if (info->brsh[i][0])
- fprintf(out, "%sBRSH[%d]=\"%s\"\n", tab, i, info->brsh[i]);
-
- for (i=0; i<8; i++)
- if (info->stnc[i][0])
- fprintf(out, "%sSTNC[%d]=\"%s\"\n", tab, i, info->stnc[i]);
-
- for (i=0; i<8; i++)
- if (info->txtr[i][0])
- fprintf(out, "%sTXTR[%d]=\"%s\"\n", tab, i, info->txtr[i]);
- */
-
- if (info->obsv) {
- fprintf(out, "#%slookat(", tab); send_XYZ(&info->obsv->came);
- fprintf(out, "#%s/* OBSV Rotate", tab); send_XYZ(&info->obsv->rota);
- fprintf(out, "#%s focaldist %.12g */\n", tab, info->obsv->foca);
- fprintf(out, "#%s)", tab);
- }
-
- /* if (info->otrk[0]) fprintf(out, "%sOTRK \"%s\"\n", tab, info->otrk); */
-
- /*
- if (info->ostr) {
- if (info->ostr->path[0])
- fprintf(out, "%sOSTR Path \"%s\"\n", tab, info->ostr->path);
- fprintf(out, "%sOSTR Translate", tab); send_XYZ(&info->ostr->tran);
- fprintf(out, "%sOSTR Rotate ", tab); send_XYZ(&info->ostr->rota);
- fprintf(out, "%sOSTR Scale ", tab); send_XYZ(&info->ostr->scal);
- i = info->ostr->info;
- strin[0] = '\0';
- if (i&(1<<0)) strcat(strin, " ABS_TRA");
- if (i&(1<<1)) strcat(strin, " ABS_ROT");
- if (i&(1<<2)) strcat(strin, " ABS_SCL");
- if (i&(1<<4)) strcat(strin, " LOC_TRA");
- if (i&(1<<5)) strcat(strin, " LOC_ROT");
- if (i&(1<<6)) strcat(strin, " LOC_SCL");
- if (i&(1<<8)) strcat(strin, " X_ALIGN");
- if (i&(1<<9)) strcat(strin, " Y_ALIGN");
- if (i&(1<<10)) strcat(strin, " Z_ALIGN");
- if (i&(1<<12)) strcat(strin, " FOLLOW_ME");
- fprintf(out, "%sOSTR Info%s\n", tab, strin);
- }
- */
-
- if (info->fade) {
- fprintf(out, "#%s/* FADE FadeAt %.12g*/\n", tab, info->fade->at);
- fprintf(out, "#%s/* FADE FadeBy %.12g*/\n", tab, info->fade->by);
- fprintf(out, "#%s/* FADE FadeTo", tab); send_RGB(&info->fade->to);
- fprintf(out, "*/\n");
- }
-
- if (info->skyc) {
- fprintf(out, "#%s/* SKYX Horizon", tab); send_RGB(&info->skyc->hori);
- fprintf(out, "*/\n");
- fprintf(out, "#%s/* SKYC Zenith ", tab); send_RGB(&info->skyc->zeni);
- fprintf(out, "*/\n");
- }
-
- if (info->ambi)
- { fprintf(out, "#%sbackground", tab); send_RGB(info->ambi); }
-
- /*
- if (info->glb0)
- for (i=0; i<8; i++)
- fprintf(out, "%sGLB0[%d]=%u\n", tab, i, info->glb0[i]);
- */
-
- outdent();
- fprintf(out, "#%s/* End INFO */\n", tab);
- }
-
- static void process_OBJ(obj)
- register OBJECT *obj;
- {
- register HIER *p;
- num_OBJ++;
- fprintf(out, "#%s/* OBJ Begin \"Hierarchy %d\" */\n", tab, num_OBJ);
- num_DESC = num_TOBJ = 0; /* Reset counters */
- cur_level = 0;
- cur_objnum = 1;
- prntline = 1;
-
- if (obj->extr) process_EXTR(obj->extr);
- else process_DESC(obj);
-
- while (root) { /* This should happen at most once. */
- p = root->next;
- free((char *)root); /* Delete this from list */
- root = p;
- outdent();
- }
-
- fprintf(out, "#%s/* End OBJ \"Hierarchy %d\" */\n", tab, num_OBJ);
- }
-
- static void process_TOBJ()
- {
- register HIER *p;
- if (num_DESC-num_TOBJ < cur_level) { /* Pop old level off HIER */
- cur_level--;
- cur_objnum = root->objnum;
- p = root->next;
- free((char *)root); /* Delete from list */
- root = p;
- outdent(); /* Pretty file formatting */
- }
- fprintf(out, "#%s}\n", tab);
- fprintf(out, "#%s/* TOBJ \"Object %d at level %d of hierarchy %d\" */\n",
- tab, cur_objnum-1, num_DESC-num_TOBJ, num_OBJ);
- num_TOBJ++;
- prntline = 1;
- }
-
- static void process_EXTR(extr)
- EXTR *extr;
- {
- if (!prntline) fprintf(out, "\n"); /* Print one anyway */
- indent();
- num_DESC++;
-
- fprintf(out, "#%s/* EXTR Begin \"Object %d at level %d of hierarchy %d\" */\n",
- tab, cur_objnum, num_DESC-num_TOBJ, num_OBJ);
- /* fprintf(out, "%scomposite {\n", tab); */
- indent();
- fprintf(out, "#%s/* LOAD \"%s\" */\n", tab, extr->filename);
- fprintf(out, "source %s\n", extr->filename);
- fprintf(out, "#%stranslate(", tab); send_XYZ(&extr->mtrx.tran);
- fprintf(out, ")\n#%sscale (", tab); send_XYZ(&extr->mtrx.scal);
- fprintf(out, "\n#%stransform {\n", tab);
- indent();
- fprintf(out, "#%s%.12g,%.12g,%.12g,", tab,
- extr->mtrx.rota1.x,
- extr->mtrx.rota1.y,
- extr->mtrx.rota1.z);
- fprintf(out, "%s%.12g,%.12g,%.12g,", tab,
- extr->mtrx.rota2.x,
- extr->mtrx.rota2.y,
- extr->mtrx.rota2.z);
- fprintf(out, "%s%.12g,%.12g,%.12g\n", tab,
- extr->mtrx.rota3.x,
- extr->mtrx.rota3.y,
- extr->mtrx.rota3.z);
- outdent();
- fprintf(out, "#%s}\n", tab);
-
- outdent();
- fprintf(out, "#%s}\n", tab);
- fprintf(out, "#%s/* End EXTR \"Object %d at level %d of hierarchy %d\" */\n",
- tab, cur_objnum, num_DESC-num_TOBJ, num_OBJ);
-
- num_TOBJ++;
- cur_objnum++;
- outdent();
- prntline = 1;
- }
-
- void color_it(desc, i)
- DESC *desc;
- int i;
- {
- double spec, r, g, b, opaq_r, opaq_g, opaq_b, c3;
- double tmp1, tmp2, tmp3, intensity;
- int spec_exp;
-
- intensity = 0.1;
- if (desc->int1) { /* Illuminated */
- r = desc->int1->x*(1./255.);
- g = desc->int1->y*(1./255.);
- b = desc->int1->z*(1./255.);
- intensity = (1./3.)*(r*r + g*g + b*b);
- }
-
- if (desc->clst) {
- r = desc->clst[i*3 ]*(1./255.);
- g = desc->clst[i*3+1]*(1./255.);
- b = desc->clst[i*3+2]*(1./255.);
- } else if (desc->colr) {
- r = desc->colr->r*(1./255.);
- g = desc->colr->g*(1./255.);
- b = desc->colr->b*(1./255.);
- } else {
- r = g = b = 1.0;
- }
-
- if (desc->rlst) {
- tmp1 = desc->rlst[i*3 ]*(1./255.);
- tmp2 = desc->rlst[i*3+1]*(1./255.);
- tmp3 = desc->rlst[i*3+2]*(1./255.);
- spec = (1./3.)*(tmp1+tmp2+tmp3); /* Average */
- c3= (1./3.)*(tmp1*tmp1 + tmp3*tmp3 + tmp3*tmp3);
- spec_exp = 1+((int)(c3*199.0));
- c3 = 1.0 - c3;
- } else if (desc->refl) {
- tmp1 = desc->refl->r*(1./255.);
- tmp2 = desc->refl->g*(1./255.);
- tmp3 = desc->refl->b*(1./255.);
- spec = (1./3.)*(tmp1+tmp2+tmp3); /* Average */
- c3= (1./3.)*(tmp1*tmp1 + tmp3*tmp3 + tmp3*tmp3);
- spec_exp = 1+((int)(c3*199.0));
- c3 = 1.0 - c3;
- } else {
- spec = 0.0;
- c3 = 0.0;
- spec_exp = 1;
- }
-
- if (desc->tlst) {
- opaq_r = 1.0 - (1./255.)*desc->tlst[i*3 ];
- opaq_g = 1.0 - (1./255.)*desc->tlst[i*3+1];
- opaq_b = 1.0 - (1./255.)*desc->tlst[i*3+2];
- } else if (desc->tran) {
- opaq_r = 1.0 - (1./255.)*desc->tran->r;
- opaq_g = 1.0 - (1./255.)*desc->tran->g;
- opaq_b = 1.0 - (1./255.)*desc->tran->b;
- } else { opaq_r = opaq_g = opaq_b = 1.0; }
-
- if (desc->prp1 && !desc->prp1[6]) { /* Flat shading */
- fprintf(out, "SippObjectAddSurface $object [SippSurfaceCreate [SippShaderBasic %.12g %.12g %.12g {%.12g %.12g %.12g} {%.12g %.12g %.12g}]]\n",
- ROUNDIT(intensity),
- ROUNDIT(spec), ROUNDIT(c3), ROUNDIT(r), ROUNDIT(g), ROUNDIT(b),
- ROUNDIT(opaq_r), ROUNDIT(opaq_g), ROUNDIT(opaq_b));
- } else { /* Phong shading */
- fprintf(out, "SippObjectAddSurface $object [SippSurfaceCreate [SippShaderPhong %.12g 1.0 %.12g %d {%.12g %.12g %.12g} {%.12g %.12g %.12g}]]\n",
- ROUNDIT(intensity),
- ROUNDIT(spec), spec_exp, ROUNDIT(r), ROUNDIT(g), ROUNDIT(b),
- ROUNDIT(opaq_r), ROUNDIT(opaq_g), ROUNDIT(opaq_b));
- }
- }
-
- static void process_DESC(object)
- OBJECT *object;
- {
- register int i;
- register HIER *p;
- register OBJECT *obj;
- register DESC *desc = object->desc;
- register int p1, p2, p3;
- int must_color_each_face = 0;
-
- num_DESC++;
- if (num_DESC-num_TOBJ > cur_level) { /* Push new level in HIER */
- if (!prntline) fprintf(out, "\n"); /* Print one anyway */
- if (!(p = (HIER*)malloc(sizeof(HIER)))) {
- fprintf(stderr, "ERROR! Out of memory.\n*** ABORT ***\n");
- exit(20);
- }
- p->next = root; /* Insert into list */
- root = p;
- root->objnum = cur_objnum;
- cur_level++;
- cur_objnum = 1;
- indent(); /* Pretty file formatting */
- }
-
- fprintf(out, "#%s/* DESC Begin \"Object %d at level %d of hierarchy %d\" */\n",
- tab, cur_objnum, num_DESC-num_TOBJ, num_OBJ);
- /* fprintf(out, "%sgrid 20 20 20\n", tab); */
- /* fprintf(out, "%scomposite {\n", tab); */
- indent();
-
- if (desc->name[0]) fprintf(out, "#%s/* name \"%s\" */\n", tab, desc->name);
-
- if (desc->posi) {
- fprintf(out, "#%stranslate(", tab);
- send_XYZ(desc->posi);
- fprintf(out, ")\n");
- }
-
- #if 0
- if (desc->colr) {
- fprintf(out, "#%sambient", tab);
- send_RGB(desc->colr);
- fprintf(out, "\n");
- }
-
- if (desc->refl) {
- fprintf(out, "#%s/* specular", tab);
- send_RGB(desc->refl);
- fprintf(out, "*/\n");
- }
-
- if (desc->tran) { fprintf(out, "#%s/* TRAN", tab); send_RGB(desc->tran);
- fprintf(out, "*/\n");
- }
- #endif
-
- #ifdef WRITETTDDD
- if (desc->fcount) {
- fprintf(out, "%sCLST Count %u\n", tab, i);
- for (i=0; i<desc->fcount; i++) {
- if (desc->colr) {
- if (desc->clst[i*3 ]==desc->colr->r &&
- desc->clst[i*3+1]==desc->colr->g &&
- desc->clst[i*3+2]==desc->colr->b) continue; /* Skip */
- } else {
- if (desc->clst[i*3 ]==255 &&
- desc->clst[i*3+1]==255 &&
- desc->clst[i*3+2]==255) continue; /* Skip this one */
- }
- fprintf(out, "%sCLST Color[%u]", tab, i);
- send_RGB((RGB_st*)&desc->clst[i*3]);
- }
- fprintf(out, "%sRLST Count %u\n", tab, i);
- for (i=0; i<desc->fcount; i++) {
- if (desc->refl) {
- if (desc->rlst[i*3 ]==desc->refl->r &&
- desc->rlst[i*3+1]==desc->refl->g &&
- desc->rlst[i*3+2]==desc->refl->b) continue; /* Skip */
- } else {
- if (desc->rlst[i*3 ]==0 &&
- desc->rlst[i*3+1]==0 &&
- desc->rlst[i*3+2]==0) continue; /* Skip this one */
- }
- fprintf(out, "%sRLST Color[%u]", tab, i);
- send_RGB((RGB_st*)&desc->rlst[i*3]);
- }
- fprintf(out, "%sTLST Count %u\n", tab, i);
- for (i=0; i<desc->fcount; i++) {
- if (desc->tran) {
- if (desc->tlst[i*3 ]==desc->tran->r &&
- desc->tlst[i*3+1]==desc->tran->g &&
- desc->tlst[i*3+2]==desc->tran->b) continue; /* Skip */
- } else {
- if (desc->tlst[i*3 ]==0 &&
- desc->tlst[i*3+1]==0 &&
- desc->tlst[i*3+2]==0) continue; /* Skip this one */
- }
- fprintf(out, "%sTLST Color[%u]", tab, i);
- send_RGB((RGB_st*)&desc->tlst[i*3]);
- }
- }
- #endif
-
- if (desc->tpar) {
- for (i=0; i<16; i++)
- fprintf(out, "#%s/* TPAR[%u]=%.12g */\n", tab, i, desc->tpar[i]);
- }
-
- if (desc->surf) {
- for (i=0; i<5; i++)
- fprintf(out, "#%s/* SURF[%u]=%d */\n", tab, i, desc->surf[i]);
- }
-
- if (desc->mttr) {
- fprintf(out, "#%s/* MTTR Type =%u */\n", tab, desc->mttr->type);
- fprintf(out, "#%s/* MTTR Index=%.12g */\n", tab, (double)desc->mttr->indx);
- }
-
- if (desc->spec) {
- fprintf(out, "#%s/* SPEC Spec=%u */\n", tab, desc->spec[0]);
- fprintf(out, "#%s/* SPEC Hard=%u */\n", tab, desc->spec[1]);
- }
-
- if (desc->prp0) {
- for (i=0; i<6; i++)
- fprintf(out, "#%s/* PRP0[%u]=%u */\n", tab, i, desc->prp0[i]);
- }
-
- if (desc->ints)
- fprintf(out, "#%s/* INTS=%.12g */\n", tab, desc->ints);
-
- #ifdef WRITETDDD
- if (desc->stry) {
- fprintf(out, "%sSTRY Path \"%s\"\n", tab, desc->stry->path);
- fprintf(out, "%sSTRY Translate", tab); send_XYZ(&desc->stry->tran);
- fprintf(out, "%sSTRY Rotate ", tab); send_XYZ(&desc->stry->rota);
- fprintf(out, "%sSTRY Scale ", tab); send_XYZ(&desc->stry->scal);
- i = desc->stry->info;
- strin[0] = '\0';
- if (i&(1<<0)) strcat(strin, " ABS_TRA");
- if (i&(1<<1)) strcat(strin, " ABS_ROT");
- if (i&(1<<2)) strcat(strin, " ABS_SCL");
- if (i&(1<<4)) strcat(strin, " LOC_TRA");
- if (i&(1<<5)) strcat(strin, " LOC_ROT");
- if (i&(1<<6)) strcat(strin, " LOC_SCL");
- if (i&(1<<8)) strcat(strin, " X_ALIGN");
- if (i&(1<<9)) strcat(strin, " Y_ALIGN");
- if (i&(1<<10)) strcat(strin, " Z_ALIGN");
- if (i&(1<<12)) strcat(strin, " FOLLOW_ME");
- fprintf(out, "%sSTRY Info%s\n", tab, strin);
- }
- #endif
-
- if (desc->shap) {
- fprintf(out, "#%s/* SHAP Shape = %u */\n", tab, desc->shap[0]);
- if (desc->shap[0]==0 && !desc->shap[1]) { /* Sphere */
- fprintf(out, "#%ssphere {\n", tab);
- indent();
- fprintf(out, "#%scenter(", tab);
- send_XYZ(desc->posi);
- fprintf(out, ")\n#%sradius %.12g\n", tab, desc->size->x);
- outdent();
- fprintf(out, "#%s}\n", tab);
- goto SKIP_REST;
- }
- fprintf(out, "#%s/* SHAP Lamp = %u */\n", tab, desc->shap[1]);
- if (desc->shap[1]==1 || desc->shap[1]==2) {
- fprintf(out, "SippLightSourceCreate ");
- if (desc->posi) send_XYZ(desc->posi); else fputs("{0 0 0} ", out);
- if (desc->int1)
- fprintf(out, "{%.12g %.12g %.12g} ",
- ROUNDIT(desc->int1->x*(1./255.)),
- ROUNDIT(desc->int1->y*(1./255.)),
- ROUNDIT(desc->int1->z*(1./255.)));
- else if (desc->colr)
- send_RGB(desc->colr);
- else fputs("{1 1 1} ", out);
-
- if (desc->shap[1]==1) /* Sunlight */
- fputs("DIRECTION\n", out);
- else /* Like a lamp */
- fputs("POINT\n", out);
- goto SKIP_REST;
- }
- }
-
- /*
- if (desc->axis) {
- fprintf(out, "%sAXIS XAxis", tab); send_XYZ(&desc->axis->xaxi);
- fprintf(out, "%sAXIS YAxis", tab); send_XYZ(&desc->axis->yaxi);
- fprintf(out, "%sAXIS ZAxis", tab); send_XYZ(&desc->axis->zaxi);
- }
-
- if (desc->size)
- { fprintf(out, "%sSIZE", tab); send_XYZ(desc->size); }
-
- if (desc->pcount) {
- fprintf(out, "%sPNTS PCount %u\n", tab, desc->pcount);
- for (i=0; i<desc->pcount; i++) {
- fprintf(out, "%sPNTS Point[%d]", tab, i);
- send_XYZ(&desc->pnts[i]);
- }
- }
-
- if (desc->ecount) {
- fprintf(out, "%sEDGE ECount %u\n", tab, desc->ecount);
- for (i=0; i<desc->ecount; i++) {
- fprintf(out, "%sEDGE Edge[%d] %u %u\n", tab, i,
- desc->edge[i<<1], desc->edge[(i<<1)+1]);
- }
- }
- */
-
- if (desc->clst || desc->rlst || desc->tlst) {
- for (i=1; i<desc->fcount; i++) {
- if (desc->clst &&
- (desc->clst[i*3 ]!=desc->clst[0] ||
- desc->clst[i*3+1]!=desc->clst[1] ||
- desc->clst[i*3+2]!=desc->clst[2])) {
- must_color_each_face = 1;
- break;
- }
- if (desc->rlst &&
- (desc->rlst[i*3 ]!=desc->rlst[0] ||
- desc->rlst[i*3+1]!=desc->rlst[1] ||
- desc->rlst[i*3+2]!=desc->rlst[2])) {
- must_color_each_face = 1;
- break;
- }
- if (desc->tlst &&
- (desc->tlst[i*3 ]!=desc->tlst[0] ||
- desc->tlst[i*3+1]!=desc->tlst[1] ||
- desc->tlst[i*3+2]!=desc->tlst[2])) {
- must_color_each_face = 1;
- break;
- }
- }
- }
-
- if (desc->fcount && desc->ecount && desc->pcount) {
- fprintf(out, "#%s/* FACE TCount %u */\n", tab, desc->fcount);
- for (i=0; i<desc->fcount; i++) {
- /* First check to make sure that this triangle is real */
- p1 = desc->edge[(desc->face[i*3])<<1];
- p2 = desc->edge[((desc->face[i*3])<<1)+1];
- if (p1 == p2) continue; /* How did *this* happen? */
- p3 = desc->edge[(desc->face[i*3+2])<<1];
- if (p1 == p3 || p2 == p3)
- p3 = desc->edge[((desc->face[i*3+2])<<1)+1];
- if (p1 == p3 || p2 == p3) continue; /* How did *this* happen? */
- /* Now check the actual points for equality */
- if (bcmp(&desc->pnts[p1], &desc->pnts[p2], sizeof(XYZ_st))==0 ||
- bcmp(&desc->pnts[p1], &desc->pnts[p3], sizeof(XYZ_st))==0 ||
- bcmp(&desc->pnts[p2], &desc->pnts[p3], sizeof(XYZ_st))==0)
- continue;
-
- fprintf(out, "SippPolygonPush {");
- send_XYZ(&desc->pnts[p1]);
- send_XYZ(&desc->pnts[p2]);
- send_XYZ(&desc->pnts[p3]);
- fprintf(out, "}\n");
- if (must_color_each_face)
- color_it(desc, i);
- }
-
- if (!must_color_each_face)
- color_it(desc, 0);
- }
-
- SKIP_REST:
-
- for (obj=object->child; obj; obj=obj->next) {
- if (obj->extr) process_EXTR(obj->extr);
- else process_DESC(obj);
- }
-
- outdent();
- fprintf(out, "#%s/* End DESC \"Object %d at level %d of hierarchy %d\" */\n",
- tab, cur_objnum, num_DESC-num_TOBJ, num_OBJ);
-
-
- cur_objnum++;
- prntline = 0;
- process_TOBJ();
- }
-
-